package StreamDemo;

import java.util.stream.Stream;

/**
 * @Author: ylc
 * @Description: void forEach(Consumer<? super T> action);
 * @Date Created in 2022-05-05 19:58
 */
public class Demo2_foreach {
    public static void main(String[] args) {
        Stream<String> stream = Stream.of("叶凡", "张三", "赵云", "张飞");
        stream.forEach(name -> System.out.println(name));
    }
}
